<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    这是<% title %>
</body>



<script>

    document.onclick = function(){
        var xhr = new XMLHttpRequest();
        xhr.open("post","http://localhost:3000/api");
        xhr.onload = function(){
            console.log(xhr.status)
            console.log(xhr.responseText)
        }
        xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        xhr.send("abc=123&qwe=345");
    }
    document.oncontextmenu = function(){
        var xhr = new XMLHttpRequest();
        xhr.open("get","http://localhost:3000/api?abc=123&qwe=345");
        xhr.onload = function(){
            console.log(xhr.status)
            console.log(xhr.responseText)
        }
        xhr.send();
    }

</script>
</html>